<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <link rel="shortcut icon" type="image/x-icon" href="#{request.contextPath}/resources/images/favicon.ico"/>
        <title>Welcome to MiptShows</title>
        <h:outputStylesheet library="css" name="miptshows.css"/>
    </h:head>
    <h:body onload="#{actionBean.redirectToActions()}">    
        <h:form styleClass="auth_form">
            <h:graphicImage library="images" name="tv.png" styleClass="tv_img" />
            <p:panel header="#{actionBean.applicationName}" footer="Please, enter your login and password from &lt;strong&gt; myshows.ru&lt;/strong&qt; into fields">
                <p:panelGrid columns="2" >
                    <h:outputText value="Login:*" styleClass="labels" />
                    <p:inputText value="#{actionBean.login}" required="true" id="login"/>

                    <h:outputText value="Password:*" styleClass="labels"/>
                    <p:inputText value="#{actionBean.password}" type="password" required="true" id="password"/>
                </p:panelGrid>
            </p:panel>
            <h:commandButton id="goNext" value="next" action="#{actionBean.authorization()}" styleClass="next_but"/>
            <!--Temporary! for fast authorization-->
            <h:commandButton value="default auth"  id="default" actionListener="#{actionBean.setDefaultAuth()}">
                <f:ajax render="login password"/>
            </h:commandButton>
        </h:form>
        <h:form>


        </h:form>
        <h:outputLink value="http://myshows.ru/login/remind" title="Забыли пароль?" target="_blank" styleClass="forget_pass_a">Forgot Password?</h:outputLink>
        <p:messages id="messages" showDetail="true" autoUpdate="true">
            <p:effect type="pulsate" event="load" delay="800">  
                <f:param name="mode" value="'show'" />  
            </p:effect>  
        </p:messages>
    </h:body>
</html>

